package my.soft.aiteacher.teacher.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import my.soft.aiteacher.teacher.pojo.SmartAnalysisVo;
import my.soft.aiteacher.teacher.service.ISmartAnalysisService;
import my.soft.aiteacher.utils.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@Tag(name = "教师-教学大纲管理")
@RestController
@RequestMapping("/smartAnalysis")
public class SmartAnalysisController {
    @Resource
    private ISmartAnalysisService ISmartAnalysisService;
    @Operation(summary = "上传")
    @PreAuthorize("hasAnyAuthority('upload:smartAnalysis')")
    @RequestMapping(value = "/upload", method = {RequestMethod.POST})
    public R upload(@RequestBody SmartAnalysisVo smartAnalysisVo) {
        ISmartAnalysisService.upload(smartAnalysisVo);
        return R.success("ok");
    }
//    @Operation(summary = "详情")
//    @RequestMapping(value = "/Detail/{fileId}", method = {RequestMethod.GET})
//    public R Detail(@PathVariable Long fileId) {
//        SmartAnalysisVo vo = ISmartAnalysisService.Detail(fileId);
//        return R.success(vo);
//    }
}
